<? include ("../init.php") ?>
<? include ("../header.php") ?>
<? include ("../menu.php") ?>
<? include ("submenu.php") ?>

<div id = "body">

<h1><?_l('news & promotion')?></h1>

<a href = "form.php" class = "add"><img src = "<?=ADMIN?>/images/icon-add.png">&nbsp;&nbsp;&nbsp;<?_l('news & promotion')?></a>

<div class = "page">
<?
  $count = $db->countOfAll('news_promotion');
  $start = setpage($count);
?>
</div>

<div class = "clear"></div>

<table class ="list">
  <tr>
    <!--<th scope="col" width = "35"><?_l('order')?></th>-->
    <!--<th scope="col"><?_l('article')?></th>-->
    <th scope="col"><?_l('date')?></th>
    <th scope="col"><?_l('detail')?></th>
    <th scope="col" width = "50"><?_l('edit')?></th>
    <th scope="col" width = "50"><?_l('delete')?></th>
  </tr>
<?
  $rss = $db->query("SELECT * FROM news_promotion ORDER By news_date DESC");
  while ($line = $db->fetchNextObject($rss)){
    $start++;
?>
  <tr>
    <!--<td><?=$start?></td>-->
    <!--<td><?=$line->topic?></td>-->
    <td><?=$line->news_date?></td>
    <td><?=$line->news_detail?></td>
    <td><a href = "edit.php?aid=<?=$line->news_id?>" class = "btn"><?_l('edit')?></a></td>
    <td><a href = "del.php?aid=<?=$line->news_id?>" class = "btn" onClick = "return confirmSubmit()"><?_l('delete')?></a></td>
  </tr>
<?
  }
?>
</table>

</div>

<style>

</style>

<? include "../footer.php" ?>